package com.token.keys;
import com.alibaba.fastjson.JSONObject;
import com.token.base.FuncUtil;

/**
 * 读取当前用户相关信息
 * @author chenjianxiong  2020/2/18
 */
public class JfReadServiceImpl implements ReadService{
    JfKeys jf;
    public JfReadServiceImpl() {
        jf = new JfKeys();
    }

    @Override
    public void setFieldData(FuncUtil funcUtil)throws Exception{
        jf.setSysAdmin(false);

        jf.setCurCompany("");
        jf.setCurCompanyShow("");
        jf.setCurDepartment("");
        jf.setCurDepartmentShow("");
        jf.setCurPosition("");
        jf.setCurPost("");
        jf.setCurPost2(null);
        jf.setCurUser("");
        jf.setCurUserShow("");
        jf.setCurPhoto("");
        jf.setWorkId("");


        jf.setSysHtml("assets");
        jf.setSysLanguage("zh");
        jf.setSysPath("");
    }

    @Override
    public void printJsonObject(FuncUtil funcUtil) throws Exception{
        funcUtil.putJsonData("data",jf.toJsonObject());
    }

    @Override
    public JSONObject getJsonObject() throws Exception {
        return jf.toJsonObject();
    }
}
